Skip to content

Support dragging notes into chat context#5443

Open
ComputelessComputer wants to merge 1 commit into
mainfrom
fix/drag-home-notes-to-chat
Open

Support dragging notes into chat context#5443
ComputelessComputer wants to merge 1 commit into
mainfrom
fix/drag-home-notes-to-chat

Conversation

@ComputelessComputer
Copy link
Copy Markdown
Collaborator

@ComputelessComputer ComputelessComputer commented Jun 2, 2026

Summary

  • add a session drag payload for note/session cards
  • let chat accept dropped session payloads as manual context
  • cover drag payload parsing and chat drop behavior

Verification

  • pnpm exec dprint fmt apps/desktop/src/chat/components/content.tsx apps/desktop/src/chat/components/content.test.tsx apps/desktop/src/chat/context/session-drag.ts apps/desktop/src/chat/context/session-drag.test.ts apps/desktop/src/main/top-meeting-timeline.tsx apps/desktop/src/shared/ui/interactive-button.tsx apps/desktop/src/sidebar/timeline/item.tsx
  • pnpm -F @hypr/desktop exec vitest run src/chat/context/session-drag.test.ts src/chat/components/content.test.tsx
  • pnpm -F desktop typecheck

Fixes #5060


Note

Low Risk
UI-only drag-and-drop wiring to existing chat context callbacks; no auth, persistence, or network changes beyond current context flow.

Overview
Users can drag note/session cards from the sidebar timeline and top meeting timeline into the chat area to attach them as manual session context.

A shared session-drag helper writes a custom drag payload (application/x-anarlog-session-context) plus plain-text fallback; ChatContent accepts drops, sets copy drop effect, and calls onAddContextEntity with a parsed manual ContextRef. Malformed or non-session drags are ignored. Timeline session buttons are draggable with pointerdown propagation stopped so they don’t fight the window drag region.

Unit tests cover payload read/write and chat drop behavior.

Reviewed by Cursor Bugbot for commit 99e8408. Bugbot is set up for automated code reviews on this repo. Configure here.

@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 2, 2026

Deploy Preview for old-char canceled.

Name Link
🔨 Latest commit 99e8408
🔍 Latest deploy log https://app.netlify.com/projects/old-char/deploys/6a1e75e68027b50008b35fb6

Add session drag payload handling so dropped notes become manual chat context.
@ComputelessComputer ComputelessComputer force-pushed the fix/drag-home-notes-to-chat branch from 0c26ee0 to 99e8408 Compare June 2, 2026 06:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drag and drop notes to chat not working from Home tab

1 participant